Graphical aid for generating object setup scripts

ABSTRACT

A computer implemented method, data processing system, and computer usable code are provided for automatically generating object setup scripts. A form is presented to a user in a graphical user interface. The user provides input in a set of fields within the form, which is received and validated. A set of object setup scripts are then generated based on the user input to the form. To generate the set of object setup scripts based on the user input an analysis is performed on the set of fields as a set of objects, and at least one variable is set to hold the value of the set of objects. String manipulations are used to obtain the values in the set of fields, and the values are entered into the set of object setup scripts.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates generally to objects used in programming. More particularly, the present invention relates to a computer implemented method, data processing system, and computer usable code for a graphical aid for generating object setup scripts.

2. Description of the Related Art

In Object-Oriented Programming (OOP), an instance of a program, that is to say a program running in a computer, is treated as a dynamic set of interacting objects. Objects in object-oriented programming extend the more general notion of objects described above to include a very specific kind of typing, which among other things allows for: data members that represent the data associated with the object or methods that access the data members in predefined ways.

In the case of most objects, data members are only accessed through the method members, making it easy to guarantee that the data will always remain in a well-defined state. However, some languages do not make distinctions between data members and methods. In a language where each object is created from a class, an object is called an instance of that class. If each object has a type, two objects with the same class would have the same data type. Creating an instance of a class is sometimes referred to as instantiating the class.

The messaging infrastructure for replication of objects may be complex and differ depending on a user's replication environment. A remote, unidirectional replication configuration may require a user to create a number of different objects with required properties. Bidirectional or peer-to-peer replication configurations are even more complex. Responsibility for setting up replication typically falls to database administrators that may not have exposure to the messaging software. Moreover, the configuration of the messaging infrastructure has been pinpointed as a point of difficulty for many administrators.

In addition to creating the required queue managers, queues, and channels, a replication administrator must understand how to declare objects within a replication metadata store. There is significant written documentation and diagrams that are provided to explain these object relationships used during replication. Thus, the generation of objects is an issue for many users and, for companies that have separate development groups, there are added issues of communicating the required objects, settings, and relationships to and from administrators and users.

SUMMARY OF THE INVENTION

The different aspects of the present invention provide a computer implemented method, data processing system, and computer usable code for automatically generating object setup scripts. A form is presented to a user in a graphical user interface. User input is received in a set of fields within the form. The user input is validated and a set of object setup scripts are generated based on the user input. In generating the set of object setup scripts based on the user input, the set of fields are analyzed as a set of objects. At least one variable is set to hold the value of the set of objects and string manipulations are used to obtain the values in the set of fields. Finally, the values are entered into the set of object setup scripts.

BRIEF DESCRIPTION OF THE DRAWINGS

The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:

FIG. 1 depicts a pictorial representation of a data processing system in which the aspects of the present invention may be implemented;

FIG. 2 depicts a block diagram of a data processing system is shown in which aspects of the present invention may be implemented;

FIG. 3 depicts a functional block diagram of the components used to automatically generate object setup scripts in accordance with an illustrative embodiment of the present invention;

FIG. 4 is a flowchart depicting the operation used in automatically generating object setup scripts in accordance with an illustrative embodiment of the present invention;

FIG. 5 depicts a completed form in accordance with an illustrative embodiment of the present invention;

FIGS. 6A and 6B depict the script and instructions that are generated by script command generator in accordance with an illustrative embodiment of the present invention; and

FIG. 7 depicts an error list in accordance with an illustrative embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The present invention provides for a graphical aid for automatically generating object setup scripts. With reference now to the figures and in particular with reference to FIG. 1, a pictorial representation of a data processing system in which the aspects of the present invention may be implemented. A computer 100 is depicted which includes system unit 102, video display terminal 104, keyboard 106, storage devices 108, which may include floppy drives and other types of permanent and removable storage media, and mouse 110. Additional input devices may be included with personal computer 100, such as, for example, a joystick, touchpad, touch screen, trackball, microphone, and the like. Computer 100 can be implemented using any suitable computer, such as an IBM® eServer™ computer or IntelliStation computer, which are products of International Business Machines Corporation, located in Armonk, N.Y. Although the depicted representation shows a computer, other embodiments of the present invention may be implemented in other types of data processing systems, such as a network computer. Computer 100 also preferably includes a graphical user interface (GUI) that may be implemented by means of systems software residing in computer readable media in operation within computer 100.

With reference now to FIG. 2, a block diagram of a data processing system is shown in which aspects of the present invention may be implemented. Data processing system 200 is an example of a computer, such as computer 100 in FIG. 1, in which code or instructions implementing the processes of the present invention may be located. In the depicted example, data processing system 200 employs a hub architecture including a north bridge and memory controller hub (MCH) 202 and a south bridge and input/output (I/O) controller hub (ICH) 204. Processor 206, main memory 208, and graphics processor 210 are connected to north bridge and memory controller hub 202. Graphics processor 210 may be connected to the MCH through an accelerated graphics port (AGP), for example.

In the depicted example, local area network (LAN) adapter 212 connects to south bridge and I/O controller hub 204 and audio adapter 216, keyboard and mouse adapter 220, modem 222, read only memory (ROM) 224, hard disk drive (HDD) 226, CD-ROM drive 230, universal serial bus (USB) ports and other communications ports 232, and PCI/PCIe devices 234 connect to south bridge and I/O controller hub 204 through bus 238 and bus 240. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, while PCIe does not. ROM 224 may be, for example, a flash binary input/output system (BIOS). Hard disk drive 226 and CD-ROM drive 230 may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. A super I/O (SIO) device 236 may be connected to south bridge and I/O controller hub 204.

An operating system runs on processor 206 and coordinates and provides control of various components within data processing system 200 in FIG. 2. The operating system may be a commercially available operating system such as Microsoft® Windows® XP (Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both). An object oriented programming system, such as the Java™ programming system, may run in conjunction with the operating system and provides calls to the operating system from Java programs or applications executing on data processing system 200 (Java is a trademark of Sun Microsystems, Inc. in the United States, other countries, or both).

Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such as hard disk drive 226, and may be loaded into main memory 208 for execution by processor 206. The processes of the present invention are performed by processor 206 using computer implemented instructions, which may be located in a memory such as, for example, main memory 208, read only memory 224, or in one or more peripheral devices.

Those of ordinary skill in the art will appreciate that the hardware in FIGS. 1-2 may vary depending on the implementation. Other internal hardware or peripheral devices, such as flash memory, equivalent non-volatile memory, or optical disk drives and the like, may be used in addition to or in place of the hardware depicted in FIGS. 1-2. Also, the processes of the present invention may be applied to a multiprocessor data processing system.

In some illustrative examples, data processing system 200 may be a personal digital assistant (PDA), which is configured with flash memory to provide non-volatile memory for storing operating system files and/or user-generated data. A bus system may be comprised of one or more buses, such as a system bus, an I/O bus and a PCI bus. Of course the bus system may be implemented using any type of communications fabric or architecture that provides for a transfer of data between different components or devices attached to the fabric or architecture. A communications unit may include one or more devices used to transmit and receive data, such as a modem or a network adapter. A memory may be, for example, main memory 208 or a cache such as found in north bridge and memory controller hub 202. A processing unit may include one or more processors or CPUs. The depicted examples in FIGS. 1-2 and above-described examples are not meant to imply architectural limitations. For example, data processing system 200 also may be a tablet computer, laptop computer, or telephone device in addition to taking the form of a PDA.

The present invention provides a graphical checklist that allows a user to more easily understand what fields are required, the required properties associated with the fields, recommended naming conventions, and where fields must be persisted in the replication metadata store.

Turning now to FIG. 3, a functional block diagram of the components used to automatically generate object setup scripts is depicted in accordance with an illustrative embodiment of the present invention. Automatic object setup script generation employs reader 302 that uses embedded scripting language 304 to create and display customized scripts, procedures, instructions, customized documents, or customized forms based on the input that a user provides. A reader, as used herein, is a computer program or computer implemented process that helps users read texts. A scripting language is a computer programming language that scripts the operations of a computer. A script is a program written in a scripting language and is normally used to facilitate tasks that are mundane. Reader 302 may be implemented using a reader, such as Adobe® Acrobat® or Microsoft® Word, and scripting language 304 may be implemented using a scripting language, such as JavaScript™ or VBScript®. By embedding scripting language 304 into reader 302, field values may be accessed based on the information a user types into fields within a form. Generally, a “reader” program, such as reader 302, which supports embedded languages, contains a dialog, window, or toolbars that allow a user to enter custom scripts. A form is a set of controls that allows a user to enter data, select values, and make information available to a system. A document may contain only form fields and may or may not be formatted. Scripting language 304 also allows for manipulation of field values using common programming functions for manipulating strings or even mathematical operations.

The scripts, procedures, customized documents, or customized forms created by scripting language 304 are displayed using graphical user interface (GUI) 306 as form 308. Graphical user interface 306 is a graphic tool that allows form 308 to be modified with user specific properties. Graphical user interface 306 is software that may be stored in main memory 208 and displayed using graphics processor 210 of FIG. 2. Form 308 may be considered a graphical checklist where scripting language 304 requires a valid value be entered into each required field.

In these illustrative examples, as the user modifies form 308, scripting language 304 within reader 302 provides exemplary field information 310. Exemplary field information 310 may be, for example, information stored in a data structure that may be an option provided to the user where some exemplary field values are dynamically populated in response to the user inputting values into other fields. Additionally, some fields may require specific values which may be accessed by the user through, for example, a drop-down menu.

When the user indicates that all entries have been made, a check or validation is run by scripting language 304 to determine if all required fields are filled and the values in those fields conform to basic field rules. Depending on the field properties, some exemplary field rule checks may be numbers, legal internet protocol (IP) addresses, and length of field information. If errors are determined, scripting language 304 provides an error indication to the user through graphical user interface 306. The user may then be requested to correct the error and then indicate that all entries have been made.

Once form 308 is verified, the data of form 308 is stored in entered field information 312. Entered field information 312 is completed information that is stored on a data structure. Scripting language 304 indicates to script command generator 314 that form 308 is complete. Then script command generator 314 generates scripts and instructions 316 based on the values entered into form 308. Scripting language 304 may be used to implement objects, methods, and properties to further generate scripts from user input. Script command generator 314 may use a scripting language to analyze a document's fields as objects. The scripting language of script command generator 314 sets a variable to hold the current value of that object, such as “var strServerName=this.getField(“SourceServerField”).” Then script command generator 314 may use string manipulations to “pull” or “grab” field entries from the document. The string manipulations are used after the values have been set to a variable and only if there is a need to validate, parse, split, or in some method manipulate the value that is pulled or grabbed out of the field. The field entries are checked and dropped into scripts generated by script command generator 314. Scripts and instructions 316 may then be used to create the required objects at the systems involved in the replication configuration.

Thus, the benefit of the illustrative embodiments is the embedded form fields and scripting language within the same reader as the graphical checklist, and the use of those fields and the scripting language to turn the reader document into a tool that creates customized scripts based on the user's input. The users may then follow the customized instructions that are tailored for a particular system by the scripting language, and run the created customized scripts to create all of the objects that are required.

FIG. 4 is a flowchart depicting the operation used in automatically generating object setup scripts in accordance with an illustrative embodiment of the present invention. As the operation begins, a user is presented with a document or graphical checklist that contains one or more fields (step 402). The form may contain exemplary values in some fields or the fields may dynamically populate as the user inputs values into other fields. The document or graphical checklist may be presented using a reader in a graphical user interface, such as reader 302 and graphical user interface 306 of FIG. 3. The user enters values into the fields of the document (step 404). The field values are then validated using basic field rules to ensure that field values are valid (step 406). Once all field values are validated, scripts and instructions are generated along with instructions for how to run the script (step 408). A script command generator, such as script command generator 314 of FIG. 3, uses a scripting language to analyze the document's fields as objects. The scripting language of script command generator 314 sets a variable to hold the current value of that object, such as “var strServerName=this.getField(“SourceServerField”).” Then script command generator 314 may use string manipulations to “pull” or “grab” field entries from the document. The string manipulations are used after the values have been set to a variable and only if there is a need to validate, parse, split, or in some method manipulate the value that is pulled or grabbed out of the field. The operation then terminates.

The form or graphical checklist groups or visually distinguishes fields in various ways. Some exemplary groupings or distinctions may be fields for which scripts are generated or fields for which scripts are not generated. Another exemplary grouping or distinction may be identifying fields that are created in a graphical user interface dialog box. The dialog box may indicate fields that are grouped together so that the user may use the graphical checklist as an aid even if a decision is made not to use the script that may be generated.

FIG. 5 depicts a completed form in accordance with an illustrative embodiment of the present invention. Exemplary form 500 is a WebSphere® MQ configuration for Q Replication, although any type of form may be presented to the user. Form 500 may be generated using a scripting language in a reader, such as reader 302 using scripting language 304 of FIG. 3. Although form 500 shows the entire field entries filled in, the fields may be dynamically inserted as the user provides input to other fields. Additionally, the fields in form 500 may be grouped by various colored box schemes, text schemes or shading schemes in order to represent different objects on the servers. Although not shown, an example may be yellow boxes that represent objects that make up Control Tables, blue boxes that represent objects that make up a Replication Queue Map, and grey boxes that represent WebSphere® MQ objects such as queues and channels. As an example, as a user inputs a value into port number 502, the value input may be dynamically input into source IP address 504. Additionally, as a user inputs a value into queue manager 506, an exemplary value may be inserted into restart queue 508 and administration queue 510 using a common naming convention. In either case, the user may opt to change the value without an error being generated as long as the changed value meets the basic form rules. Using standard naming conventions for each of the fields and based on the user input, numerous fields may be automatically populated with standard entries. Each time a user enters a field or leaves a field, every single field on the form is “recalculated” with updated values.

All of the fields requiring user input have associated properties. Some fields, such as port number 502, may be limited to only numbers. Other fields, such as replication queue map 512 may be limited in length of input to forty-eight characters. Other properties may be to limit an entry to an IP address where four sets of numbers are required where each set has to be less than 255. Finally, sample entries button 514 may be selected by the user to populate all of the fields with sample entries. Likewise, clear form button 516 may be selected or if a user wants to start over.

FIGS. 6A and 6B depict the scripts and instructions that are generated by script command generator in accordance with an illustrative embodiment of the present invention. The scripts and instructions generated in FIGS. 6A and 6B may be scripts and instructions such as scripts and instructions 316 generated by script command generator 314 of FIG. 3. Scripts and instructions 602 indicate the six instructions and the required scripts necessary to set up queue manager QM1. Scripts and instructions 604 indicate the six instructions and the required scripts necessary to set up queue manager QM2. Exemplary scripts and instructions 602 and 604 are for setting up WebSphere® MQ objects; however, any type of object scripts and instructions may be generated.

FIG. 7 is an error list in accordance with an illustrative embodiment of the present invention. Error list 702 shows the fields of a form, such as form 500 of FIG. 5, that require an entry. The user may then use the error list to return to the form and complete the required field entries. Exemplary errors 702 are for setting up WebSphere® MQ objects; however, any type of errors may be generated.

Thus, the illustrative embodiments of the present invention provides a graphical checklist that helps the user understand the relationship between all the objects and the two different programs, such as Q Replication and WebSphere® MQ, by showing the user a graphical representation of the relationship. The illustrative embodiments may be used to display complicated relationships graphically. The graphic fields assist in automating and increasing the speed of completing various setup tasks.

The illustrative embodiments may also be used for event publishing and job control language scripts. For example, an ecommerce company that has a PDF document that can be given to the sales department in order to add a product to a website. The PDF contains a graphical representation of a “Look” of the current website with field entries where such information as titles and prices would go. The sales department fills out all of the fields: title, price, description, weight, etc. When finished an “upload” button is clicked and automatically the PDF takes the input, checks it, and runs the insert queries against the database. The advantage is the scripting is very quick and enables the end user to not worry about the programming or how to insert into the database.

The invention can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.

Furthermore, the invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer-usable or computer readable medium can be any tangible apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD.

A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.

Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.

The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated. 

1. A computer implemented method for automatically generating object setup scripts, the computer implemented method comprising: presenting a form to a user in a graphical user interface; receiving user input in a set of fields within the form; validating the user input; and generating a set of object setup scripts based on the user input.
 2. The computer implemented method of claim 1, wherein generating the set of object setup scripts based on the user input further comprises: analyzing the set of fields as a set of objects; setting at least one variable to hold the value of the set of objects; using string manipulations to obtain the values in the set of fields; and entering the values into the set of object setup scripts.
 3. The computer implemented method of claim 1, wherein the form is a graphical checklist that provides a visual relationship between one or more fields within the set of fields.
 4. The computer implemented method of claim 3, wherein the visual relationship is distinguished by at least one of color, font, or shading.
 5. The computer implemented method of claim 1, further comprising: generating instructions for how to run the set of object setup scripts.
 6. The computer implemented method of claim 1, wherein the form is created using a scripting language.
 7. The computer implemented method of claim 1, wherein the form is presented in a reader.
 8. The computer implemented method of claim 1, further comprising: automatically populating unpopulated fields within the set of fields based on the user input.
 9. The computer implemented method of claim 1, further comprising: automatically populating unpopulated fields upon identification of a request to populate the unpopulated fields with sample entries.
 10. The computer implemented method of claim 1, wherein the form is one of a display customized script, a procedure, a customized document, or a customized form.
 11. A data processing system comprising: a bus system; a communications system connected to the bus system; a memory connected to the bus system, wherein the memory includes a set of instructions; and a processing unit connected to the bus system, wherein the processing unit executes the set of instructions to present a form to a user in a graphical user interface; receive user input in a set of fields within the form; validate the user input; and generate a set of object setup scripts based on the user input.
 12. The data processing system of claim 11, wherein the processing unit executing the set of instructions to generate the set of object setup scripts based on the user input includes the processing unit executing the set of instructions to analyze the set of fields as a set of objects; set at least one variable to hold the value of the set of objects; use string manipulations to obtain the values in the set of fields; and enter the values into the set of object setup scripts.
 13. The data processing system of claim 11, wherein the form is a graphical checklist that provides a visual relationship between one or more fields within the set of fields.
 14. The data processing system of claim 13, wherein the visual relationship is distinguished by at least one of color, font, or shading.
 15. The data processing system of claim 11, wherein the processing unit executes the set of instructions to generate instructions for how to run the set of object setup scripts.
 16. The data processing system of claim 11, wherein the form is created using a scripting language.
 17. The data processing system of claim 11, wherein the form is presented in a reader.
 18. The data processing system of claim 11, wherein the processing unit executes the set of instructions to automatically populate unpopulated fields within the set of fields based on the user input.
 19. The data processing system of claim 11, wherein the processing unit executes the set of instructions to automatically populate unpopulated fields upon identification of a request to populate the unpopulated fields with sample entries.
 20. The data processing system of claim 11, wherein the form is one of a display customized script, a procedure, a customized document, or a customized form.
 21. A computer program product comprising: a computer usable medium including computer usable program code for automatically generating object setup scripts, the computer program product including: computer usable program code for presenting a form to a user in a graphical user interface; computer usable program code for receiving user input in a set of fields within the form; computer usable program code for validating the user input; and computer usable program code for generating a set of object setup scripts based on the user input.
 22. The computer program product of claim 21, wherein the computer usable program code for generating the set of object setup scripts based on the user input further includes: computer usable program code for analyzing the set of fields as a set of objects; computer usable program code for setting at least one variable to hold the value of the set of objects; computer usable program code for using string manipulations to obtain the values in the set of fields; and computer usable program code for entering the values into the set of object setup scripts.
 23. The computer program product of claim 21, wherein the form is a graphical checklist that provides a visual relationship between one or more fields within the set of fields.
 24. The computer program product of claim 23, wherein the visual relationship is distinguished by at least one of color, font, or shading.
 25. The computer program product of claim 21, further including: computer usable program code for generating instructions for how to run the set of object setup scripts.
 26. The computer program product of claim 21, wherein the form is created using a scripting language.
 27. The computer program product of claim 21, wherein the form is presented in a reader.
 28. The computer program product of claim 21, further including: computer usable program code for automatically populating unpopulated fields within the set of fields based on the user input.
 29. The computer program product of claim 21, further including: computer usable program code for automatically populating unpopulated fields upon identification of a request to populate the unpopulated fields with sample entries.
 30. The computer program product of claim 21, wherein the form is one of a display customized script, a procedure, a customized document, or a customized form. 